//
//  YJWalletAddressView.m
//  YJB
//
//  Created by 韦朝宾 on 16/6/25.
//  Copyright © 2016年 YJB. All rights reserved.
//

#import "YJWalletAddressView.h"

@interface YJWalletAddressView ()

@end

@implementation YJWalletAddressView
+ (instancetype)getWalletAddressView
{
    return [[[NSBundle mainBundle]loadNibNamed:NSStringFromClass(self) owner:nil options:nil] lastObject];
}

-(void)awakeFromNib
{
    self.urlLabel.layer.borderColor = kUIColorFromRGB(0xcccccc).CGColor;
    self.urlLabel.layer.borderWidth = 0.5;
}

- (IBAction)cancelClick
{
    if (self.walletBlock)
    {
        self.walletBlock(YJWalletAddressViewButtonTypeCancel);
    }
}

- (IBAction)copyClick
{
    if (self.walletBlock)
    {
        self.walletBlock(YJWalletAddressViewButtonTypeCopy);
    }
}

- (IBAction)checkCLick
{
    if (self.walletBlock)
    {
        self.walletBlock(YJWalletAddressViewButtonTypeCheck);
    }
}

- (IBAction)teachClick
{
    if (self.walletBlock)
    {
        self.walletBlock(YJWalletAddressViewButtonTypeTeach);
    }
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    [self removeFromSuperview];
}

@end
